DetachResource
DetachResource Prevent resource from being discarded when file is closed Handle rHandle ; existing, valid handle to a resource without releasing it from memory. This can be used to keep one or more
resources in memory after closing a resource file.
rHandle is a handle leading to some variable length resource data. This
Returns: none (if rHandle is not a handle to a resource, or if detachment is disallowed, ResError will return an error).
NIL while maintaining the resource in memory and keeping the handle's
master pointer valid. One significant effect is that when a resource's file is
closed (see CloseResFile), the resource data is not purged from memory. After this call, rHandle is no longer considered to be a resource handle.
call GetResource (et. al.) for the same handle, the resource will be read into memory again. You can copy the detached resource and install the
duplicate into the resource list via AddResource. To discard the detached This function is not valid for resources tagged with the resChanged
attribute (ResError returns resAttrErr).